package com.wujian.love.study.effectiveJava;

import java.util.regex.Pattern;

/**
 * 避免创建不必要的对象
 */
public class Demo1 {


    private static final Pattern ROMAN = Pattern.compile("");
    
    

    static boolean isRomanNumeral(String s){
        return ROMAN.matcher(s).matches();
    }



    //static boolean isRomanNumeral(String s){
    //    return s.matches("");
    //}
}
